#ifndef SCREEN_H
#define SCREEN_H

#include <SDL.h>
#include "Singleton.h"

//Screen class wont be a singleton if want to have a dual-screen game 
class Screen : public Uncopyable
{
public:		//separate public/private make obvious to anyone that it is a singleton
	//static there so you can call it even though screen doesn't exist yet
	static Screen* Instance()
	{
		//static here means it lives in the "magic static place" 
		//and will only be initialised on the first function call
		static Screen myScreen;
		return &myScreen;
	}
	friend class Singleton<Screen>;
private:	//Screen() is now private as it is being singletonised...
	Screen();


public:
	~Screen();
	bool CreateWindow(int width, int height);
	void Flip();
	SDL_Surface* GetSurface();

	SDL_Surface* m_surface;
	 /*
		"friend" circumvents private member variables and has potential for 
		abuse. It is only here because they are very closely related but not 
		close enough for inheritance.
	 */
//	 friend class Image;
};

///typedef Singleton<Screen> TheScreen;

#endif